package java3_16.Teacher;
//教师类  父类
public class Teachers {
    private String name;
    private int age;
    private String sex;
    private String teachYear;

    public Teachers(){

    }

    public Teachers(String name, int age, String sex, String teachYear) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.teachYear = teachYear;
    }

    public void selfIntroduce(){
        System.out.println("我是:"+name+"\n"+"性别是:"+sex+"\n"+"年龄是:"+age+"\n"+"教龄是:"+teachYear);
    }

    public void giveLession(){
        System.out.println("我是:"+name+"\n"+"现在开始上课");
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getTeachYear() {
        return teachYear;
    }

    public void setTeachYear(String teachYear) {
        this.teachYear = teachYear;
    }
}
